package com.tradeservices.client;

import static java.util.Collections.singletonMap;

import javax.ws.rs.core.MediaType;

import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;

public class TradeServiceClient {

	public static void main(String[] args) {
		Client c = Client.create();
		WebResource r = c
				.resource("http://localhost:8080/rampup-rest/service/tradeService/getTrade/1");
		MediaType mediaTypeWithVersion = new MediaType("application", "json",
				singletonMap("version", "1"));
		String response = r.accept(mediaTypeWithVersion).get(String.class);

		System.out.println("Resonse : " + response);
		
		c.destroy();
	}

}
